package top.minuy.algorithm.sort.shell;

import top.minuy.util.constant.SortType;
import top.minuy.util.generate.ArrayGenerator;
import top.minuy.util.helper.SortingHelper;

import java.util.Arrays;
/**
 * @author Minuy
 * @time 08:30
 * @date 2021/9/29
 */
public class Test {
    public static void main(String[] args) {
        Integer[] arr = {1,4,2,1,0,2};
        ShellSort.sort2(arr);
        for (int a : arr){
            System.out.print(a + " ");
        }
        System.out.println();

        System.out.println("性能测试：");
        int n = 1000000;
        Integer[] aa = ArrayGenerator.generateRandomArray(n,n);
        Integer[] ab = Arrays.copyOf(aa,aa.length);
        SortingHelper.SortTest(SortType.ShellSort2,aa);
        SortingHelper.SortTest(SortType.ShellSort3,ab);
    }
}
